package cn.zhaoyuening.zshop4j.manager.service.impl;

import cn.zhaoyuening.zshop4j.common.utils.FastFdsClientUtils;
import cn.zhaoyuening.zshop4j.manager.service.FileResourcesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by Zhao on 2017/4/8.
 * 文件上传下载服务
 */
@Service("fileResourcesService")
public class FileResourcesServiceImpl implements FileResourcesService {
    @Autowired
    private FastFdsClientUtils fastFdsClientUtils;

    @Override
    public String uploadImage(byte[] imgBuf, String fileName) {
        String fileUrl = fastFdsClientUtils.uploadFile(imgBuf, fileName);
        return fileUrl;
    }
}
